package com.yuneec.droneservice.parse;

/**
 * Created by gjw on 2016/12/5.
 */

public class Figure7 {
    public byte index;
    public byte receiver_aNum;
    public byte receiver_abits;
    public byte receiver_trNum;
    public byte receiver_trbits;
    public byte receiver_swNum;
    public byte receiver_swbits;
    public byte receiver_reply_channel_num;
    public byte receiver_reply_channel_bits;
    public byte transmitter_request_channel_num;
    public byte transmitter_request_channel_bits;
    public byte extra_channel_num;
    public byte extra_channel_bits;
    public byte receiver_analog_parse_type;
    public byte receiver_trim_parse_type;
    public byte receiver_switch_parse_type;
    public byte receiver_reply_channel_parse_type;
    public byte transmitter_request_channel_parse_type;
    public byte extra_channel_parse_type;

    public byte[] getDatas() {
        byte[] datas = new byte[19];
        datas[0] = index;
        datas[1] = receiver_aNum;
        datas[2] = receiver_abits;
        datas[3] = receiver_trNum;
        datas[4] = receiver_trbits;
        datas[5] = receiver_swNum;
        datas[6] = receiver_swbits;
        datas[7] = receiver_reply_channel_num;
        datas[8] = receiver_reply_channel_bits;
        datas[9] = transmitter_request_channel_num;
        datas[10] = transmitter_request_channel_bits;
        datas[11] = extra_channel_num;
        datas[12] = extra_channel_bits;
        datas[13] = receiver_analog_parse_type;
        datas[14] = receiver_trim_parse_type;
        datas[15] = receiver_switch_parse_type;
        datas[16] = receiver_reply_channel_parse_type;
        datas[17] = transmitter_request_channel_parse_type;
        datas[18] = extra_channel_parse_type;
        return datas;
    }

    @Override
    public String toString() {
        return "Figure7{" +
                "index=" + index +
                ", receiver_aNum=" + (receiver_aNum & 0xff) +
                ", receiver_abits=" + (receiver_abits & 0xff) +
                ", receiver_trNum=" + (receiver_trNum & 0xff) +
                ", receiver_trbits=" + (receiver_trbits & 0xff) +
                ", receiver_swNum=" + (receiver_swNum & 0xff) +
                ", receiver_swbits=" + (receiver_swbits & 0xff) +
                ", receiver_reply_channel_num=" + (receiver_reply_channel_num & 0xff) +
                ", receiver_reply_channel_bits=" + (receiver_reply_channel_bits & 0xff) +
                ", transmitter_request_channel_num=" + (transmitter_request_channel_num & 0xff) +
                ", transmitter_request_channel_bits=" + (transmitter_request_channel_bits & 0xff) +
                ", extra_channel_num=" + extra_channel_num +
                ", extra_channel_bits=" + extra_channel_bits +
                ", receiver_analog_parse_type=" + receiver_analog_parse_type +
                ", receiver_trim_parse_type=" + receiver_trim_parse_type +
                ", receiver_switch_parse_type=" + receiver_switch_parse_type +
                ", receiver_reply_channel_parse_type=" + receiver_reply_channel_parse_type +
                ", transmitter_request_channel_parse_type=" + transmitter_request_channel_parse_type +
                ", extra_channel_parse_type=" + extra_channel_parse_type +
                '}';
    }
}
